import { Pagination } from "antd";
import { PaginationProps } from "antd/lib";

function Padination(props: {
    showsize: any; total: any; 
}) {
    const onShowSizeChange: PaginationProps['onChange'] = (current, pageSize) => {
        console.log(current, pageSize);
        props.showsize({
            current,
            pageSize
        })
    };
    return ( 
        <>
            <Pagination onChange={onShowSizeChange} showSizeChanger style={{marginTop:20}} showQuickJumper defaultCurrent={1} total={props.total} showTotal={(total) => `共 ${total} 条数据`} align="end" />
        </>
     );
}

export default Padination;